package com.example.demo.controller.game;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

// 飞机类
@Data
public class Pot {
    Vec pos;
    Vec speed;
    Vec rot;
    double mass;
    String user;
    List<Integer> visited;

    public Pot(String user){
        this.user = user;
        mass = 1;
        pos = new Vec(0,0);
        speed = new Vec(0,0);
        rot = new Vec(0,0);
        visited = new ArrayList<>();
        visited.add(0);
    }

    public Pot(Vec pos,Vec rot,String user){
        this.pos = pos;
        speed = new Vec(0,0);
        this.rot = rot;
        mass = 1;
        this.user = user;
        visited = new ArrayList<>();
        visited.add(0);
    }

    public double dis(Pot pot){
        return this.pos.dis(pot.pos);
    }
    public double dis(Vec pos){
        return this.pos.dis(pos);
    }

}
